import pytest,logging,yagmail,HTMLTestRunner_cn

def baogao():
    baogao1=HTMLTestRunner_cn.HTMLTestRunner(open('jiuxian.html','w'),title='aaa',description='aca')
    return baogao1

def log():
    logging.basicConfig(filename='jiuxian.log',filemode='a+',level=logging.DEBUG,format='%(filename)s %(message)s %(asctime)s %(levelname)s %(lineno)d')

def emailll():
    emaill=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com',port=465)
    emaill.send(to='2314336117@qq.com',subject='酒仙网系统webUI自动化测试报告',contents='dads')

if __name__ == '__main__':
    log()
    emailll()
    pytest.main([r"C:\Users\23143\PycharmProjects\pythonProject911\guoqingzuoye2\TestCase.py",'-s','--html=jiuxian.html'])